/**
 */
package gatperdut.chato.model.Chato.Entity.Skill.impl;

import gatperdut.chato.model.Chato.Entity.Skill.KnownSkill;
import gatperdut.chato.model.Chato.Entity.Skill.SkillPackage;
import gatperdut.chato.model.Chato.Entity.Skill.SkillsContainer;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.internal.cdo.CDOObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Skills Container</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link gatperdut.chato.model.Chato.Entity.Skill.impl.SkillsContainerImpl#getKnownSkills <em>Known Skills</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class SkillsContainerImpl extends CDOObjectImpl implements SkillsContainer {
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected SkillsContainerImpl() {
        super();
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass() {
        return SkillPackage.Literals.SKILLS_CONTAINER;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected int eStaticFeatureCount() {
        return 0;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @SuppressWarnings("unchecked")
    public EList<KnownSkill> getKnownSkills() {
        return (EList<KnownSkill>)eDynamicGet(SkillPackage.SKILLS_CONTAINER__KNOWN_SKILLS, SkillPackage.Literals.SKILLS_CONTAINER__KNOWN_SKILLS, true, true);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
        switch (featureID) {
            case SkillPackage.SKILLS_CONTAINER__KNOWN_SKILLS:
                return ((InternalEList<?>)getKnownSkills()).basicRemove(otherEnd, msgs);
        }
        return super.eInverseRemove(otherEnd, featureID, msgs);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case SkillPackage.SKILLS_CONTAINER__KNOWN_SKILLS:
                return getKnownSkills();
        }
        return super.eGet(featureID, resolve, coreType);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @SuppressWarnings("unchecked")
    @Override
    public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case SkillPackage.SKILLS_CONTAINER__KNOWN_SKILLS:
                getKnownSkills().clear();
                getKnownSkills().addAll((Collection<? extends KnownSkill>)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID) {
        switch (featureID) {
            case SkillPackage.SKILLS_CONTAINER__KNOWN_SKILLS:
                getKnownSkills().clear();
                return;
        }
        super.eUnset(featureID);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID) {
        switch (featureID) {
            case SkillPackage.SKILLS_CONTAINER__KNOWN_SKILLS:
                return !getKnownSkills().isEmpty();
        }
        return super.eIsSet(featureID);
    }

} //SkillsContainerImpl
